#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"


void testGetCost() {
	int i;
	int cardNumber[] = {curse, estate, duchy, province, copper, silver, gold, adventurer, council_room, feast, gardens, mine, remodel, smithy, village, baron, great_hall, minion, steward, tribute, ambassador, cutpurse, embargo, outpost, salvager, sea_hag, treasure_map};
	int cardCost[] = {0, 2, 5, 8, 0, 3, 6, 6, 5, 4, 4, 5, 4, 4, 3, 4, 3, 5, 3, 5, 3, 4, 2, 5, 4, 4, 4};
	
	for(i = 0; i < (sizeof(cardNumber)/sizeof(*cardNumber)); i++) {
		if ( getCost(cardNumber[i]) == cardCost[i] )
			assert( getCost(cardNumber[i]) == cardCost[i] );
		else
			printf("getCost(): FAILED for CardNumber %d\n", cardNumber[i]);
	}
	printf("All tests passed!\n");
}

int main(int argc, char *argv[]) {
	testGetCost();
	return 0;
}